package server.jsons;

import com.google.gson.annotations.Expose;

public class Message {
	
	static public String TYPE_FAIL = "Fail";
	static public String TYPE_SUCCESS = "Success";
	static public String TYPE_REGISTER_NEW_USER = "Register new User";
	static public String TYPE_LOGIN = "Login User";
	static public String TYPE_LOGOUT = "Logout User";
	static public String TYPE_INCORRECT_JSON = "Incorrect Json received";
	static public String TYPE_UNEXPECTED_MESSAGE = "Unexpected Message Type Value received";
	static public String TYPE_USER_EXISTS = "User exists already";
	
	@Expose protected String type;
	@Expose protected String userId;
	@Expose protected String sessionId;

	
	public Message(){
		this.type = Message.TYPE_FAIL;
		this.userId = "-1";
		this.sessionId = "nosessionid";
	}
	
	
	
	public String getType() {
		return type;
	}



	public void setType(String type) {
		this.type = type;
	}


	public String getSessionId() {
		return sessionId;
	}



	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}



	public void resetID(){
		this.userId = "-1";
	}

	
	public String getMsgType(){
		return this.type;
	}
	



	public String getUserId() {
		return userId;
	}



	public void setUserId(String userId) {
		this.userId = userId;
	}



	public void setMessage(String type){
		this.type = type;
	}

}
